Last active
December 16, 2015 18:20
-
-
Save n9/5476930 to your computer and use it in GitHub Desktop.
Sequelize in Saltarelle proposal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// library | |
[Imported] | |
[Reflectable] | |
public interface ISequelizeEntity { } | |
[Imported, IgnoreNamespace, ScriptName("Object")] | |
public abstract class SequelizeEntity : ISequelizeEntity | |
{ | |
[ScriptSkip] | |
public SequelizeEntity() { } // prevent `Object.call(this);` | |
[IntrinsicProperty] | |
public int Id { get { return 0; } } | |
[IntrinsicProperty] | |
public DateTime? CreatedAt { get { return null; } } | |
[IntrinsicProperty] | |
public DateTime? UpdatedAt { get { return null; } } | |
} | |
// user code | |
public class MyEntity : SequelizeEntity | |
{ | |
public string A; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment